import {Pager} from '../../shared/model/pager.model';

export const ModulePageConfig = {
  title: '菜单管理',
  table: 'sysModule',
  controller: 'sysModule',
  search: {
    // columnCount: '3,3,6',
    columnCount: 4,
    fieldLabel: [4, 8],
    data: {},
    cols: [
      { field: 'moduleName', label: '模块名称', input: 'text' },
      { field: 'LinkUrl', label: '链接地址', input: 'text' },
      { field: 'parentId', label: '上级模块', input: 'select' },
    ]
  },
  list: {
    title: '菜单列表',
    data: [],
    cols: [
      // { field: 'moduleCode', header: '编码'},
      { field: 'moduleName', header: '名称'},
      // { field: 'icon', header: '图标'},
      { field: 'linkUrl', header: '链接地址'},
      { field: 'isLeafMenu', header: '是否叶子菜单', isYesNo: true, editType: 'checkbox'},
      { field: 'enabled', header: '激活', isYesNo: true, editType: 'checkbox'},
      { field: 'sortNo', header: '排序', style: { width: '80px' }, editType: 'input'},
      // { field: 'lastLoginDate', header: '最近登录时间'},
    ],
    pager: new Pager({pageSize: 10, pageLinks: 3, rowsPerPageOptions: [3, 5, 7]}),
    // loading: false
  },
  dialog: {
    cols: [
      { field: 'roleName', label: '角色名', validates: { required: '', minlength: '最小长度为4.' } },
      { field: 'enabled', label: '是否启用' },
      { field: 'description', label: '描述' },
    ],
    add: { header: '新增角色', width: '600', },
    edit: { header: '修改角色', width: '600' }
  }
}
